<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'messageselect.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
	<link rel="stylesheet" type="text/css" href="css/common.css">

  </head>
  
  <body>
    <div class="centerdiv">
    	<table class="leftstyle">
    			<tr>
    				<td colspan="2"><font class="hot">热门推荐：</font></td>
    			</tr>
    			<tr>
    				<td colspan="2">
						<ul>
							<li>穆斯林的葬礼</li>
							<li>乔布斯传</li>
							<li>麦田里的守望者</li>
						</ul>
    				</td>
    			</tr>
    			<tr>
    				<td colspan="2"><font class="hot">友情链接：</font></td>
    			</tr>
    			<tr>
    				<td colspan="2">
						<ul>
							<s:iterator value="#session.linkList">
						    	<li><a href="<s:property value='url' />" target="_top" class="myfont">
						    			<s:property value="site" />
						    		</a>
						    	</li>	
						    </s:iterator>
					
						</ul>
    				</td>
    			</tr>
    			
    	</table>
    	<table class="tablestyle">
    		<tr class="title_font">
    			<td>用户留言</td>
    		</tr>
    		<tr class="table_title">
    			<th>用户名</th>
    			<th>提交时间</th>
    			<th>标题</th>
    			<th style="width:300px">内容</th>
    		</tr>
    		<s:if test="%{size==0}">
    			<td colspan="4">还没有留言</td>
    		</s:if>
    		<s:else>
    		    <s:iterator value="%{userMessageList}">
    		    	<tr>
	    		    	<td align="center"><s:property value="username"/></td>
	    		    	<td align="center"><s:property value="submitTime"/></td>
	    		    	<td align="center"><s:property value="title"/></td>
	    		    	<td><s:property value="content"/></td>    		    	
    		    	</tr>
    			</s:iterator>
    		</s:else>
    		<tr>
    			<td colspan="3" style="float:left; position: relative;left:400px">
    				<a href="jsp/user/messageleave.jsp">我要留言</a>
    				<a href="jsp/user/booklist.jsp">返回继续购物</a>
    			</td>
    		</tr>
    	</table>
    </div>
  </body>
</html>
